//package com.a918.tasks;
//
//import com.a918.entity.TaskEntity;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.CommandLineRunner;
//import org.springframework.stereotype.Component;
//
//import java.util.Arrays;
//import java.util.List;
//
//@Component
//public class StartInitTask implements CommandLineRunner {
//
//    @Autowired
//    private MyScheduledTask myScheduledTask;
//
//    @Override
//    public void run(String... args) throws Exception {
//        List<TaskEntity> list = Arrays.asList(
//                new TaskEntity(1, "测试1", "0/1 * *  * * ?"),
//                new TaskEntity(2, "测试2", "0/1 * *  * * ?")
//        );
//        myScheduledTask.refresh(list);
//    }
//}